from django.db import models


# Create your models here.
class Source(models.Model):
    title = models.CharField(max_length=100, verbose_name="文件标题")
    file_type = models.CharField(max_length=100, verbose_name="文件类型")
    # 视频封面
    cover_key = models.CharField(max_length=150, null=True, blank=True, verbose_name='视频封面')
    key = models.CharField(max_length=150, verbose_name="资源名称")
    size = models.IntegerField(verbose_name='文件大小')
    publisher = models.CharField(max_length=100, verbose_name="发布人")
    views = models.IntegerField(default=0, verbose_name='浏览量')
    create_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 'source'
